Test Series - computer fundamental

Test Number 52/95

Q: Which is interpreted language?
A. C++
B. C
C. MATLAB
D. Fortran
Solution: MATLAB is an interpreted language. All the other languages are compiled languages. In the case of Interpreted language, the translation to machine-language is performed incrementally at run-time.
Q: In compiled language, the translation to machine-language is performed incrementally at run-time.
A. True
B. False
C. .
D. none
Solution: The statement is false. The translation is performed once, then executable file is run as frequently as needed without further translation.
Q: The first widely-used high level language developed in 1957.
A. C
B. Java
C. Fortran
D. Cobol
Solution: Fortran which stands for Formula Translation was the first widely-used high level language. It was developed by IBM for scientific applications. The program was entered as punch cards.
Q: A text file that contains our program is called as __________
A. Exe file
B. Doc file
C. Obj file
D. Source file
Solution: A file that contains the code or the main program is called as the source file. Source code must be processed by a compiler to create an executable file.
Q: First statement in a fortran code is _________
A. include statement
B. import statement
C. program statement
D. @data statement
Solution: It is the program statement. program statement is followed by the program name.
Syntax : program xyz
Q: A Fortran is not ___________
A. System supported
B. Source supported
C. Case Sensitive
D. Programmer supported
Solution: Fortran is not a case sensitive language. For e.g. PROGRAM xyz also works. Also, multiple consecutive blank spaces are ignored.
Q: The delimiter in a FORTRAN code.
A. Semicolon
B. Blank space
C. Colon
D. Comma
Solution: Delimiter separates the tokens we use in our code. In a FORTRAN code, single blank space serves as a delimiter. Though, multiple blank spaces are ignored.
Q: A program that reads the source code and converts it to a form usable by the computer.
A. Interpreter
B. Compiler
C. Linker
D. Assembler
Solution: A compiler does this task. Internally, 3 steps are performed: preprocessing, checking and compiling. Further, assembler and linker do the work.
Q: A valid variable declaration in FORTRAN is __________
A. real :: Celsius
B. real Celsius;
C. Celsius real;
D. real : Celsius
Solution: A variable declaration has the following syntax:
Data type :: variable name
Q: In FORTRAN, the declarations of variables can be modified using the _____ parameter.
A. kind
B. make
C. select
D. change
Solution: Kind can be used for this purpose. It can often be used for the precision of reals. If you want to change the precision, it can easily be done using one line of code.

You Have Score    /10